﻿namespace CSharpPro.Properties._1021;

public class Demo
{
    public void TestPrint()
    {
        /*Father father = new Father();
        father.Print();
        Child child = new Child();
        child.Print();
        Console.WriteLine(child.id);
        Father father2 = new Child();
        father2.Print();
        */
        Father father1 = new Father();
        Father father2 = new Child();
        Father father3 = new Son();
        father1.Print();
        father2.Print();
        father3.Print();
        /*var int32 = Convert.ToInt32("123");
        Student student = new Student();
        student.Id = 1001;
        student.Name = "张三";
        Console.WriteLine(student.Name);
        Student student2 = new Student(1002,"李四");
        Console.WriteLine(student2.Name);
        Console.WriteLine(student2.ToString());*/

    }

    public int Compare(int a,int b,int c)
    {
        
        if (a > b && a > c)
        {
            return a;
        }
        else if (b > c && b > a)
        {
            return b;
        }
        else if (c > a && c > b)
        {
            return c;
        }

        else
        {
            return 0;
        }
    }
}